/**
 * This class represents the possible animated representations.
 */
package org.hackystat.ui.orb.client.common;

import java.util.Map;

/**
 * This class represents the possible animated representations.
 * @author David J. Nickles
 *
 */
public class AnimationsEnum extends Enum {
  
  /**
   * Required no parameter constructor.
   */
  public AnimationsEnum() {
    super();
  }

  /**
   * Name and cardinal pair.
   * @param name the animation name.
   * @param ordinal the associated value.
   */
  private AnimationsEnum(String name, int ordinal) {
    super(name, ordinal);
  }
  
  /** {@literal} NONE Steady color presentation. */        
  public static /* final */ AnimationsEnum NONE = new AnimationsEnum("NONE", 0); 
  /** {@literal} VERYSLOW pulse animation. */        
  public static /* final */ AnimationsEnum VERYSLOW = new AnimationsEnum("VERYSLOW", 1); 
  /** {@literal} SLOW pulse animation. */        
  public static /* final */ AnimationsEnum SLOW = new AnimationsEnum("SLOW", 2); 
  /** {@literal} MEDIUMSLOW pulse animation. */        
  public static /* final */ AnimationsEnum MEDIUMSLOW = new AnimationsEnum("MEDIUMSLOW", 3);
  /** {@literal} MEDIUM pulse animation. */        
  public static /* final */ AnimationsEnum MEDIUM = new AnimationsEnum("MEDIUM", 4); 
  /** {@literal} MEDIUMFAST pulse animation. */        
  public static /* final */ AnimationsEnum MEDIUMFAST = new AnimationsEnum("MEDIUMFAST", 5);
  /** {@literal} FAST pulse animation. */        
  public static /* final */ AnimationsEnum FAST = new AnimationsEnum("FAST", 6);
  /** {@literal} VERYFAST pulse animation. */        
  public static /* final */ AnimationsEnum VERYFAST = new AnimationsEnum("VERYFAST", 7);
  /** {@literal} CRESCENDO pulse animation. */        
  public static /* final */ AnimationsEnum CRESCENDO = new AnimationsEnum("CRESCENDO", 8);
  /** {@literal} HEARTBEAT pulse animation. */        
  public static /* final */ AnimationsEnum HEARTBEAT = new AnimationsEnum("HEARTBEAT", 9);

  /** {@literal} The collection of possible animations represented by this enumeration. */  
  private static /* final */ Map values =
    makeValuesMap(new Enum[] { NONE, VERYSLOW, SLOW, MEDIUMSLOW, MEDIUM, MEDIUMFAST, FAST, 
      VERYFAST, CRESCENDO, HEARTBEAT });
  
  /**
   * Exchanges a name for an enumerated value.
   * @param name the animation name.
   * @return the enumerated value.
   */
  public static AnimationsEnum valueOf(String name) {
    return (AnimationsEnum)values.get(name);
  }
  
  /**
   * This method generates an array containing all the enumerated animations.
   * @return an array containing all the enumerated animations.
   */
  public static AnimationsEnum[] toArray() {
    return (AnimationsEnum[])values.values().toArray(new AnimationsEnum[0]);
  }
}
